QST format
NOTE: This article is incomplete. Much work is still left to be done. QST format is the file format used for quests within The Witcher. QST File QST files are based on BioWare's Generic File Format (GFF), and it is assumed that the reader of this article is familiar with GFF. Main Structure The main structure (the one with Type = -1) has the following format Field name Field Type Field Description QuestLocName CExoLocString Quest name as it appears in the list QuestLocMainPhas CExoLocString ? QuestLocDescrip CExoLocString ?*) QuestLocShortDes CExoLocString ?*) QuestFailedLocDe CExoLocString ?*) QuestFailedLocSh CExoLocString ?*) Primary BYTE Is 1 if is a part of the plot MotherDB CExoString ? Seems to be unused MainPhase list of QuestPhase structures Main (initial?) phase of the quest, always contain exactly one item Notes: *) I suppose that this is the text that you see when you get (or fail) a quest. QuestPhase structure Field name Field Type Field Description Name CExoString Internal quest name Type INT ? OnCompleted CExoString Script to execute, refers to ncs file OnFailed CExoString Script to execute, refers to ncs file JournalEntry CExoString ? Comment CExoString Comment WaypointTag CExoString Internal name of map POI to highlight for the stage Optional CHAR ? SubquestsColor DWORD ? LocName CExoLocString Name of the quest LocPhaseName CExoLocString Phase name LocDescription CExoLocString Phase description (long, shown in white in quests window) LocShortDescript CExoLocString Phase summary (short, shown in yellow in quests window) FailedLocDesc CExoLocString Failure description (long, shown in white in quests window) FailedLocShortDe CExoLocString Failure summary (short, shown in yellow in quests window) BlockName CExoString ? IsInBlock BYTE ? Completed BYTE ? Failed BYTE ? QuestBegan BYTE ? FirstStarted INT ? CurrPhase INT ? NewQuestInfoSent BYTE ? QISDFTP BYTE ? WorldmapRegion BYTE ? Phases list of QuestPhase structures Other quest phases and sub-quests Conditions list of Condition structures Some conditions**) PhaseActions list of Action structures Actions to perform when moving onto this phase **) This field is a double-purpose one. The first purpose is to choose which branch of multi-branch phase to choose. "Branching" is not only decision-based, it also allows the game to show different text depending on quest progress - like number of sephirots left to be placed in the corresponding quest. The second purpose is to check weather the player has advanced to next quest phase. Overall condition for the phase is done by joining single conditions in this list with (supposedly) "AND" predicate. Condition structure Field name Field Type Field Description Type INT Type of condition Parameters list of Parameter structures ParameterIsProgr list of ParameterIsProgr structures ? Condition types Type Description Parameter P1 meaning 0 Flag value Flag name 2 Act number Act number 4 Something to do with quest stages ? 5 7 Destroyed Count monsters "MonsterName" MonsterName#Count 8 Has at least Count of items Item Item#Count 10 Drunk potion? Potion name 11 ? ? 12 Has journal entry tagged "Tag" (after dialog DialogName) DialogName@Tag Notes: Learning sign (Aard at least) is equal to drinking a potion! DialogName is a name of DLG file. Action structure Field name Field Type Field Description Id INT Action type Params list of Parameter structures Parameters Action types Type Description Parameter #1 meaning Parameter #2 meaning 305442690 Gain XP XP amount Not used 305442691 Get item Item name Giver name 305442692 Give item Item name To whom 305442694 ? MST file name Not used 305442695 Execute a script NCS file name Not used 305442696 Spawn or move NPC NPC name location 305442697 Gain money Amount From whom 305442699 Set flag Flag name Flag value Parameter structure Field name Field Type Field Description P1 CExoString Parameter name MarkedAsTrue BYTE Optional ParameterIsProgr structure Field name Field Type Field Description P1 BYTE Parameter name MarkedAsTrue BYTE ? (Optional) Category:File formats Category:Quests